<?php
$servername_mysql = "localhost:3306";
$username_mysql = "root";
$password_mysql = "root";

// Create connection
$conn = mysqli_connect($servername_mysql, $username_mysql, $password_mysql);
$conn->query('set names utf8;');
// Check connection
if (!$conn) {
    die("Connection failed: " . mysqli_connect_error());
}
echo "数据库链接成功";

?>
